/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package EntityClass;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

/**
 *
 * @author Ben
 */
@Entity
public class Diagnosis implements Serializable {
    private static final long serialVersionUID = 1L;
   
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long diagnosisId;
    @ManyToOne
    private Medical_Procedure medical_procedure; 
    private String diseaseCode;
    private String description;
    
    public Diagnosis(){}
    
    public void create (Medical_Procedure procedure, String code, String description){
        
        this.setMedical_procedure(procedure);
        this.setDiseaseCode(code);
        this.setDescription(description);
        
    }
    
    public Long getId() {
        return diagnosisId;
    }
    
    public void setId(Long id) {
        this.diagnosisId = id;
    }

   
    /**
     * @return the diseaseCode
     */
    public String getDiseaseCode() {
        return diseaseCode;
    }

    /**
     * @param diseaseCode the diseaseCode to set
     */
    public void setDiseaseCode(String diseaseCode) {
        this.diseaseCode = diseaseCode;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return the medical_procedure
     */
    public Medical_Procedure getMedical_procedure() {
        return medical_procedure;
    }

    /**
     * @param medical_procedure the medical_procedure to set
     */
    public void setMedical_procedure(Medical_Procedure medical_procedure) {
        this.medical_procedure = medical_procedure;
    }
    
}
